import { Component, Input } from '@angular/core';

import { NzModalRef } from 'ng-zorro-antd/modal';

@Component({
  selector: 'app-base-single-input-modal',
  templateUrl: './single-input-modal.component.html'
})
export class SingleInputModalComponent {
  @Input() value: string = '';
  @Input() minlength: number = 0;
  @Input() maxlength: number = 255;

  constructor(private modal: NzModalRef) {}

  cancel(): void {
    this.modal.destroy(undefined);
  }

  sure(): void {
    this.modal.destroy(this.value);
  }
}
